<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/common/taglibs.jsp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Map常量管理</title>
    <%@ include file="/common/meta.jsp" %>
    <%@ include file="/common/public_input.jsp" %>
    <%@ include file="/common/public.jsp" %>

    <script type="text/javascript" src="${ctx}/js/validate/jquery.validate.js"></script>
    <script type="text/javascript" src="${ctx}/js/validate/messages_cn.js"></script>
    <script>
        $(document).ready(function () {

            /* $("#inputForm").validate({
             onsubmit: true,
             rules: {
             name:{
             required:true,
             maxlength:50
             },
             code:{
             required:true,
             maxlength:100
             }
             },
             messages: {
             name:{
             remote:'名称已存在'
             },
             code:{
             remote:'编码已存在'
             }
             }
             });*/
        });
    </script>
</head>

<body>
<div class="div-tabs-nav">
    <ul class="ui-tabs-nav">
            <li class="ui-tabs-selected">直播流创建</li>
    </ul>
</div>

<div class="ui-tabs-panel">
    <form id="inputForm" action="${ctx}/stream/stream/save.action" method="post">
        <div id="message"><s:actionmessage theme="custom" cssClass="success"/></div>
        <div>频道<s:if test="id!=0">修改</s:if><s:else>创建</s:else></div>
        <table class="noborder">
            <s:if test="id!=0">
                <tr>
                    <td>ID:</td>
                    <td>
                        <s:textfield name="entity.id" size="40" readonly="true"/>
                    </td>
                </tr>
            </s:if>
            <tr>
                <td>频道ID:</td>
                <td>
                     <s:textfield name="entity.fatherId" size="40" maxLength="50" readonly="true"/>
                </td>
            </tr>
            <tr>
                <td>流名称:</td>
                <td>
                    <s:if test="id!=0">
                        <s:textfield name="entity.streamName" size="40" maxLength="50" readonly="true"/>
                    </s:if>
                    <s:else>
                         <s:textfield name="entity.streamName" size="40" maxLength="50"/>
                    </s:else>
                </td>
            </tr>
            <tr>
                <td>RTMP地址:</td>
                <td><s:textfield name="entity.streamIp" size="40" maxLength="50"/></td>
            </tr>
            <tr>
                <td>清晰度:</td>
                <td>
                    <s:select cssClass="qsbox" name="entity.streamType"
                              list="channelConfigs" listValue="descr" listKey="val"/>
                </td>
            </tr>
            <tr>
                <td>镜像服务器数:</td>
                <td>
                    <s:textfield name="entity.peerCount" size="40" value="10"/>
                </td>
            </tr>
            <s:if test="id!=0">
                <tr>
                    <td>是否启用:</td>
                    <td>
                        <s:radio list="#{'0':'无效','1':'启动'}" name="entity.isEnable" value="entity.isEnable" />
                    </td>
                </tr>
            </s:if>
        </table>
        <input type="submit" value="保存"/>
    </form>
</div>
</body>
</html>
